3.2.25 \(\int (a+a \sin (e+f x)) (g \tan (e+f x))^p \, dx\) [125]

Optimal. Leaf size=129 \[ \frac {a \, _2F_1\left (1,\frac {1+p}{2};\frac {3+p}{2};-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{1+p}}{f g (1+p)}+\frac {a \cos ^2(e+f x)^{\frac {1+p}{2}} \, _2F_1\left (\frac {1+p}{2},\frac {2+p}{2};\frac {4+p}{2};\sin ^2(e+f x)\right ) \sin (e+f x) (g \tan (e+f x))^{1+p}}{f g (2+p)} \]

[Out]

a*hypergeom([1, 1/2+1/2*p],[3/2+1/2*p],-tan(f*x+e)^2)*(g*tan(f*x+e))^(1+p)/f/g/(1+p)+a*(cos(f*x+e)^2)^(1/2+1/2
*p)*hypergeom([1+1/2*p, 1/2+1/2*p],[2+1/2*p],sin(f*x+e)^2)*sin(f*x+e)*(g*tan(f*x+e))^(1+p)/f/g/(2+p)

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 129, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2789, 3557, 371, 2682, 2657} \begin {gather*} \frac {a (g \tan (e+f x))^{p+1} \, _2F_1\left (1,\frac {p+1}{2};\frac {p+3}{2};-\tan ^2(e+f x)\right )}{f g (p+1)}+\frac {a \sin (e+f x) \cos ^2(e+f x)^{\frac {p+1}{2}} (g \tan (e+f x))^{p+1} \, _2F_1\left (\frac {p+1}{2},\frac {p+2}{2};\frac {p+4}{2};\sin ^2(e+f x)\right )}{f g (p+2)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])*(g*Tan[e + f*x])^p,x]

[Out]

(a*Hypergeometric2F1[1, (1 + p)/2, (3 + p)/2, -Tan[e + f*x]^2]*(g*Tan[e + f*x])^(1 + p))/(f*g*(1 + p)) + (a*(C
os[e + f*x]^2)^((1 + p)/2)*Hypergeometric2F1[(1 + p)/2, (2 + p)/2, (4 + p)/2, Sin[e + f*x]^2]*Sin[e + f*x]*(g*
Tan[e + f*x])^(1 + p))/(f*g*(2 + p))

Rule 371

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*((c*x)^(m + 1)/(c*(m + 1)))*Hyperg
eometric2F1[-p, (m + 1)/n, (m + 1)/n + 1, (-b)*(x^n/a)], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rule 2657

Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[b^(2*IntPart[
(n - 1)/2] + 1)*(b*Cos[e + f*x])^(2*FracPart[(n - 1)/2])*((a*Sin[e + f*x])^(m + 1)/(a*f*(m + 1)*(Cos[e + f*x]^
2)^FracPart[(n - 1)/2]))*Hypergeometric2F1[(1 + m)/2, (1 - n)/2, (3 + m)/2, Sin[e + f*x]^2], x] /; FreeQ[{a, b
, e, f, m, n}, x]

Rule 2682

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[a*Cos[e + f*
x]^(n + 1)*((b*Tan[e + f*x])^(n + 1)/(b*(a*Sin[e + f*x])^(n + 1))), Int[(a*Sin[e + f*x])^(m + n)/Cos[e + f*x]^
n, x], x] /; FreeQ[{a, b, e, f, m, n}, x] &&  !IntegerQ[n]

Rule 2789

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.), x_Symbol] :> Int[Expan
dIntegrand[(g*Tan[e + f*x])^p, (a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2
, 0] && IGtQ[m, 0]

Rule 3557

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[b/d, Subst[Int[x^n/(b^2 + x^2), x], x, b*Tan[c + d
*x]], x] /; FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]

Rubi steps

\begin {align*} \int (a+a \sin (e+f x)) (g \tan (e+f x))^p \, dx &=\int \left (a (g \tan (e+f x))^p+a \sin (e+f x) (g \tan (e+f x))^p\right ) \, dx\\ &=a \int (g \tan (e+f x))^p \, dx+a \int \sin (e+f x) (g \tan (e+f x))^p \, dx\\ &=\frac {(a g) \text {Subst}\left (\int \frac {x^p}{g^2+x^2} \, dx,x,g \tan (e+f x)\right )}{f}+\frac {\left (a \cos ^{1+p}(e+f x) \sin ^{-1-p}(e+f x) (g \tan (e+f x))^{1+p}\right ) \int \cos ^{-p}(e+f x) \sin ^{1+p}(e+f x) \, dx}{g}\\ &=\frac {a \, _2F_1\left (1,\frac {1+p}{2};\frac {3+p}{2};-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{1+p}}{f g (1+p)}+\frac {a \cos ^2(e+f x)^{\frac {1+p}{2}} \, _2F_1\left (\frac {1+p}{2},\frac {2+p}{2};\frac {4+p}{2};\sin ^2(e+f x)\right ) \sin (e+f x) (g \tan (e+f x))^{1+p}}{f g (2+p)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [F]
time = 1.10, size = 0, normalized size = 0.00 \begin {gather*} \int (a+a \sin (e+f x)) (g \tan (e+f x))^p \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Integrate[(a + a*Sin[e + f*x])*(g*Tan[e + f*x])^p,x]

[Out]

Integrate[(a + a*Sin[e + f*x])*(g*Tan[e + f*x])^p, x]

________________________________________________________________________________________

Maple [F]
time = 0.25, size = 0, normalized size = 0.00 \[\int \left (a +a \sin \left (f x +e \right )\right ) \left (g \tan \left (f x +e \right )\right )^{p}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))*(g*tan(f*x+e))^p,x)

[Out]

int((a+a*sin(f*x+e))*(g*tan(f*x+e))^p,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(g*tan(f*x+e))^p,x, algorithm="maxima")

[Out]

integrate((a*sin(f*x + e) + a)*(g*tan(f*x + e))^p, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(g*tan(f*x+e))^p,x, algorithm="fricas")

[Out]

integral((a*sin(f*x + e) + a)*(g*tan(f*x + e))^p, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int \left (g \tan {\left (e + f x \right )}\right )^{p}\, dx + \int \left (g \tan {\left (e + f x \right )}\right )^{p} \sin {\left (e + f x \right )}\, dx\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(g*tan(f*x+e))**p,x)

[Out]

a*(Integral((g*tan(e + f*x))**p, x) + Integral((g*tan(e + f*x))**p*sin(e + f*x), x))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))*(g*tan(f*x+e))^p,x, algorithm="giac")

[Out]

integrate((a*sin(f*x + e) + a)*(g*tan(f*x + e))^p, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (g\,\mathrm {tan}\left (e+f\,x\right )\right )}^p\,\left (a+a\,\sin \left (e+f\,x\right )\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*tan(e + f*x))^p*(a + a*sin(e + f*x)),x)

[Out]

int((g*tan(e + f*x))^p*(a + a*sin(e + f*x)), x)

________________________________________________________________________________________